--#include "data\functions\FuBen\MaterialFuben\MaterialFuben.lua" once				--材料副本
--#include "data\functions\FuBen\AllDay.lua" once										--屠龙深渊

--#include "data\functions\Activity\ActivityGuide.lua"   once         -- 活动状态
--#include "data\functions\Activity\DailyActivity\BaoZangActivity.lua"   once         	-- 宝藏传说
--#include "data\functions\Activity\DailyActivity\NightFighting.lua"   once         	-- 夜战皇城
--#include "data\functions\Boss\BossAttackCommon.Lua" once								--BOSS来袭

--#include "data\functions\Activity\BackStageActivity\DailyRecharge.lua"   once         -- 每日充值
--#include "data\functions\Activity\BackStageActivity\TimeLimitShopping.lua"   once         -- 限时商品
--#include "data\functions\Activity\BackStageActivity\TotalRecharge.lua"   once         -- 累计充值
--#include "data\functions\Activity\BackStageActivity\TotalCost.lua"   once         -- 累计消费


--#include "data\functions\Activity\Operation\operation.lua" once	--运营活动

--#include "data\functions\Activity\CombineServer\CombineServerHandle.lua" once			--合服活动
--#include "data\functions\Activity\CombineServer\CombineServerGuildSbkWar.lua" once

--#include "data\functions\Cross\CrossBossAttack.Lua" once								--跨服BOSS来袭
--#include "data\functions\Cross\CrossUnionWar.lua" once        						--跨服联盟战
--#include "data\functions\Activity\DailyActivity\NationwideRedPackets.lua" once		--全民红包
--#include "data\functions\Activity\DailyActivity\WanShouMoPu.lua" once					--万兽魔谱
--#include "data\functions\Activity\Escort\Escort.lua" once                         --极速押运


--#include "data\functions\ActorEvent\AnswerHandle.lua" once							--活动答题
--#include "data\functions\Activity\DailyActivity\MulphaAdventure.lua" once					--玛法大冒险
--#include "data\functions\Cross\CrossLeagueMatches.lua" once        					--跨服联赛
--#include "data\functions\Cross\CrossGatherCrystal.lua" once        					--跨服水晶
--#include "data\functions\Cross\CrossEatChicken.lua" once        						--跨服吃鸡

--#include "data\functions\Misc\ResourceRetrieve.lua"   once        					--资源找回(未进行的活动)

--#include "data\functions\Activity\DailyActivity\ServerPK.lua"   once    --全服争霸
--#include "data\functions\Activity\DailyActivity\SupplyContention.lua" once				--补给争夺
--#include "data\functions\Activity\OpenServer\OpenServerAdvertisementPage.lua" once        --开服广告页
--#include "data\functions\Activity\Carnival\CarnivalCommon.lua "  once 				--狂欢活动

--消息容器
ActivityDirective = {}
--注册接口
local function reg_activity_fun(msgid,Func)
	if(type(msgid)~= 'number' or type(Func) ~= 'function')then
		print("注册活动消息出错MsgId =",msgid)
		assert(false)
	end
	if(ActivityDirective[msgid] ~= nil)then
		print("重复注册MsgId =",msgid)
		assert(false)		
	end
	ActivityDirective[msgid] = Func
end
--------------------------------消息注册-----------------------------------------
reg_activity_fun(LogicCmd.activitySys.sub.cOperationActivity,  OperationActivityHandler )		--获取后台活动配置
reg_activity_fun(LogicCmd.activitySys.sub.cMaterialCopyInfo,  SendMaterialFubenData) --材料副本信息
reg_activity_fun(LogicCmd.activitySys.sub.cEnterMaterialCopy,  EnterMaterialFuben)	--进入材料副本
--reg_activity_fun(LogicCmd.activitySys.sub.cGetMaterialCopyAward,  GetMaterialFubenAwards)	--领取材料副本奖励
--reg_activity_fun(LogicCmd.activitySys.sub.cSweepMaterialCopy,  SweepMaterialFuben)	--材料副本扫荡
reg_activity_fun(LogicCmd.activitySys.sub.cPathMonsterNestInfo, AllDayGetInfo)	---请求屠龙深渊信息
reg_activity_fun(LogicCmd.activitySys.sub.cPathMonsterNestEnter, AllDayEnterScene)	--进入屠龙深渊	
reg_activity_fun(LogicCmd.activitySys.sub.cPathMonsterNestStarAward, AllDayGetAward)		--领取屠龙深渊星星奖励
reg_activity_fun(LogicCmd.activitySys.sub.cPathMonsterNestSweep, AllDaySweep)		--屠龙深渊扫荡
reg_activity_fun(LogicCmd.activitySys.sub.cPathMonsterNestGetAward, AllDayNormalAward)		--屠龙深渊奖励
--reg_activity_fun(LogicCmd.activitySys.sub.cPathMonsterNestGiftBag, AllDayBuyShop)	--购买屠龙深渊特惠细胞
--reg_activity_fun(LogicCmd.activitySys.sub.cPathMonsterNestTreasure, AllDayGetCheat)	--领取屠龙深渊宝箱
--reg_activity_fun(LogicCmd.activitySys.sub.cPathMonsterNestRank, AllDaySendRank)		--请求屠龙深渊排行榜
--reg_activity_fun(LogicCmd.activitySys.sub.cGotoBaoZangPosition, GotoBaoZang)		--去宝藏传说怪物处
reg_activity_fun(LogicCmd.activitySys.sub.sGetNightFightRank, NightFightingGetRank)			--夜战排行榜数据
reg_activity_fun(LogicCmd.activitySys.sub.cGetDailyRechargeInfo, SendDailyRechargeData)		--请求每日充值信息
reg_activity_fun(LogicCmd.activitySys.sub.cGetDailyRechargeAward, GetDailyRechargeAwards)		--领取每日充值奖励
reg_activity_fun(LogicCmd.activitySys.sub.cGetTimeLimitShoppingInfo, SendTimeLimitShoppingData)			--请求限时商品信息

reg_activity_fun(LogicCmd.activitySys.sub.cGetTotalRechargeInfo, SendTotalRechargeData)			--请求累计充值信息
reg_activity_fun(LogicCmd.activitySys.sub.cGetTotalRechargeAward, GetTotalRechargeAwards)	--领取累计充值奖励
reg_activity_fun(LogicCmd.activitySys.sub.cGetTotalCostInfo, SendTotalCostData)			--请求累计消费信息
reg_activity_fun(LogicCmd.activitySys.sub.cGetTotalCostAward, GetTotalCostAwards)		--领取累计消费奖励

reg_activity_fun(LogicCmd.activitySys.sub.cWorshipMonarchDoWorship, WorshipMonarchDoWorship)		--[膜拜君主]膜拜

reg_activity_fun(LogicCmd.activitySys.sub.cCombineServerGetData, CombineServerSendData)				--[合服活动]请求当日限时礼包的数据
reg_activity_fun(LogicCmd.activitySys.sub.cCombineServerBuyGiftBag, CombineServerBuyGiftBag)		--[合服活动]领取当日限时礼包的第N个礼包
reg_activity_fun(LogicCmd.activitySys.sub.cCombineServerGetChargeGift, CombineServerGetChargeGift)		--[合服活动]领取当日限时礼包的第N个礼包
reg_activity_fun(LogicCmd.activitySys.sub.cCombineServerBossPartyTeleport, CombineServerBossPartyTeleport)	--[合服活动] 合服首次沙巴克

reg_activity_fun(LogicCmd.activitySys.sub.cMagicCityGetOwnerData, HandleSendMagicCityMyEnterTimes)		--[魔域迷城]请求楼主通关数据（全部关卡）
reg_activity_fun(LogicCmd.activitySys.sub.cMagicCityGetMyData, HandleSendMagicCityMyData)			--[魔域迷城]请求某关卡的本人闯关数据
reg_activity_fun(LogicCmd.activitySys.sub.cMagicCityOp, HandleMagicCityOp)					--[魔域迷城]某关卡的操作

reg_activity_fun(LogicCmd.activitySys.sub.cEquipBossData, HandleEquipBoss)					--装备boss

reg_activity_fun(LogicCmd.activitySys.sub.cGetCrossUnionWarRank, CrossUnionWarGetRank)					--联盟战排行榜
reg_activity_fun(LogicCmd.activitySys.sub.cGetCrossUnionWarAwardData, CrossUnionWarGetAwardData)		--联盟战奖励信息
reg_activity_fun(LogicCmd.activitySys.sub.cGetCrossUnionWarAward, CrossUnionWarGetAward)				--联盟战奖励领取
reg_activity_fun(LogicCmd.activitySys.sub.cGetCombineServerRankData, GetCombineServerRankData)			--合服活动
reg_activity_fun(LogicCmd.activitySys.sub.cGetCombineServerGiftBagData, CombineServerGiftData)			--合服活动
reg_activity_fun(LogicCmd.activitySys.sub.cGetCombineServerGiftBagAward, BuyCombineServerGift)			--合服活动
reg_activity_fun(LogicCmd.activitySys.sub.cCombineServerAreanApply, HandleCombineArenaApply)			--[合服擂台]报名或取消报名
reg_activity_fun(LogicCmd.activitySys.sub.cCombineServerFightSupport, HandleCombineArenaFightSupport)	--[合服擂台]声援
reg_activity_fun(LogicCmd.activitySys.sub.cCombineServerAreanEnter, HandleCombineArenaEnter)			--[合服擂台]进入擂台或大乱斗
reg_activity_fun(LogicCmd.activitySys.sub.cCombineServerAreanData, SendCombineServerAreanData)			--[合服擂台]获取擂台数据

reg_activity_fun(LogicCmd.activitySys.sub.cGetResRetrieveData, SendResRetrieveData)			--[资源找回]下发资源找回数据
reg_activity_fun(LogicCmd.activitySys.sub.cDoResRetrieve, ResRetrieve)						--[资源找回]进行资源找回

reg_activity_fun(LogicCmd.activitySys.sub.cNationwideRedPacketsData, SendNationwideRedPacketsData)		--获取数据
reg_activity_fun(LogicCmd.activitySys.sub.cNationwideRedPacketsGive, NationwideRedPacketsGive)			--捐献
reg_activity_fun(LogicCmd.activitySys.sub.cNationwideRedPacketsGet, NationwideRedPacketsGet)			--抢红包
reg_activity_fun(LogicCmd.activitySys.sub.cNationwideRedPacketsAward, NationwideRedPacketsAward)			--抢红包

reg_activity_fun(LogicCmd.activitySys.sub.cWanShouMoPuDataReq, WanShouMoPuDataReq)						--[万兽魔谱]信息请求
reg_activity_fun(LogicCmd.activitySys.sub.cWanShouMoPuAwardGet, WanShouMoPuAwardGet)					--[万兽魔谱]提交领奖

reg_activity_fun(LogicCmd.activitySys.sub.cEscortInitData, SendEscortData)			--获取数据
reg_activity_fun(LogicCmd.activitySys.sub.cEscortRefresh, RefreshEscort)			--刷新镖车品质
reg_activity_fun(LogicCmd.activitySys.sub.cAddEscortCount, AddEscortCount)			--购买镖车次数
reg_activity_fun(LogicCmd.activitySys.sub.cEscortStart, StartEscort)			--开始运镖
reg_activity_fun(LogicCmd.activitySys.sub.cGiveUpEscort, CancelEscort)			--放弃运镖

reg_activity_fun(LogicCmd.activitySys.sub.cMulphaAdventureInitData, SendMulphaAdventureData)			--玛法大冒险数据
reg_activity_fun(LogicCmd.activitySys.sub.cMulphaAdventureGetDice, MulphaAdventureGetDice)			--玛法大冒险领取骰子
reg_activity_fun(LogicCmd.activitySys.sub.cMulphaAdventureUseDice, MulphaAdventureUseDice)			--玛法大冒险使用骰子
reg_activity_fun(LogicCmd.activitySys.sub.cMulphaAdventureOperate, MulphaAdventureOperate)			--玛法大冒险关卡操作
reg_activity_fun(LogicCmd.activitySys.sub.cMulphaAdventureGetAward, MulphaAdventureGetAward)			--玛法大冒险领取圈数
reg_activity_fun(LogicCmd.activitySys.sub.cMulphaAdventureRank, MulphaAdventureGetRankData)			--玛法大冒险排行榜

reg_activity_fun(LogicCmd.activitySys.sub.cCrossLeagueInit, SendCrossLeagueData)			--[跨服联赛]获取擂台数据
reg_activity_fun(LogicCmd.activitySys.sub.cCrossLeagueSign, CrossLeagueSign)				--[跨服联赛]报名
reg_activity_fun(LogicCmd.activitySys.sub.cCrossLeagueGetAward, CrossLeagueGetAward)		--[跨服联赛]领奖

reg_activity_fun(LogicCmd.activitySys.sub.cCrossGatherCrystalData, CrossGatherCrystalGetRank)				--[跨服水晶]请求数据
reg_activity_fun(LogicCmd.activitySys.sub.cCrossGatherCrystalExchange, CrossGatherCrystalExchange)			--[跨服水晶]兑换积分
reg_activity_fun(LogicCmd.activitySys.sub.cCrossGatherCrystalAward, CrossGatherCrystalGetAward)				--[跨服水晶]领取奖励

reg_activity_fun(LogicCmd.activitySys.sub.cCrossEatChickenData, CrossEatChickenGetRank)				--[跨服吃鸡]请求数据
reg_activity_fun(LogicCmd.activitySys.sub.cCrossEatChickenSign, CrossEatChickenSign)			--[跨服吃鸡]请求报名
reg_activity_fun(LogicCmd.activitySys.sub.cCrossEatChickenSettle, CrossEatChickenSettle)				--[跨服吃鸡]请求设置
reg_activity_fun(LogicCmd.activitySys.sub.cCrossEatChickenAward, CrossEatChickenGetAward)				--[跨服吃鸡]请求奖励

reg_activity_fun(LogicCmd.activitySys.sub.cGetServerPKRank, SendServerPKRank)	--全服争霸排行榜数据
reg_activity_fun(LogicCmd.activitySys.sub.cSupplyContentionInitData, SupplyContentionGetRankData)		--补给争夺排行榜
reg_activity_fun(LogicCmd.activitySys.sub.cSupplyContentionGetPoint, SupplyContentionGetPoint)			--补给争夺坐标

reg_activity_fun(LogicCmd.activitySys.sub.cOpenServerAdvertisementPageAwardState, OpenServerADPageAwardStateHandle)	--开服广告业奖励领取状态
reg_activity_fun(LogicCmd.activitySys.sub.cOpenServerAdvertisementPageAwardDraw, OpenServerADAwardsDrawHandle)	--开服广告业奖励领取状态

reg_activity_fun(LogicCmd.activitySys.sub.cGodShieldBossOp, GodShieldBossOp)	--英雄神盾副本

reg_activity_fun(LogicCmd.activitySys.sub.cCarnivalGetData, CarnivalGetData)	--[狂欢活动]请求数据
reg_activity_fun(LogicCmd.activitySys.sub.cCarnivalPutItemToWishingPool, CarnivalPutItemToWishingPool)	--[狂欢活动]投入许愿池
reg_activity_fun(LogicCmd.activitySys.sub.cCarnivalEnterBoss, CarnivalEnterBoss)	--[狂欢活动]进入boss场景
reg_activity_fun(LogicCmd.activitySys.sub.cCarnivalBuyBuff, CarnivalBuyBuff)	--[狂欢活动]购买buff

--------------------------------------------------------------------------------
function ActivityHandleImpl(sysarg, systemid, msgid, packet)
	if ActivityDirective[msgid]  then
		--print("ActivityHandleImpl="..msgid)
		ActivityDirective[msgid](sysarg,packet)
	else
		--特殊处理
	end
end




---------------------------------------事件触发--------------------------

table.insert(InitFnTable, InitMaterialFuben)
table.insert(InitFnTable, InitAllDay)
